CREATE EXTERNAL TABLE jms_dwd.dwd_tab_sitetakingmonitor_base_dt
(
    recordid              string COMMENT '记录编号',
    billcode              string COMMENT '运单编号',
    packagecode           string COMMENT '所属袋号',
    scantype              string COMMENT '扫描类型',
    nextstation           string COMMENT '上一站或下一站',
    destination           string COMMENT '目的地点',
    scanuser              string COMMENT '扫描雇员',
    inputsite             string COMMENT '录入部门',
    scantime              timestamp COMMENT '扫描时间',
    inputtime             timestamp COMMENT '录入时间',
    send_deliver_user     string COMMENT '派件或收件员',
    send_site             string COMMENT '寄件网点',
    pcs                   bigint COMMENT '件数',
    weight                double COMMENT '重量',
    goodstype             string COMMENT '物品类别',
    expresstype           string COMMENT '快件类型',
    shifts                string COMMENT '班次',
    sendflag              bigint COMMENT '发件标识',
    sendsite              string COMMENT '发件网点',
    sendtime              timestamp COMMENT '发件时间',
    problemflag           bigint COMMENT '问题件标识',
    remark                string COMMENT '备注',
    pistolid              string COMMENT '巴枪ID',
    scansitecode          string COMMENT '扫描网点编号',
    uploadtime            timestamp COMMENT '上传时间',
    remark3               string COMMENT '备注3',
    scanusercode          string COMMENT '扫描雇员编号',
    send_deliver_usercode string COMMENT '收派员编号',
    nextstationcode       string COMMENT '上下一站编号',
    source                string COMMENT '来源',
    remark5               string COMMENT '备注5',
    remark6               double COMMENT '备注6',
    remark4               string COMMENT '备注4',
    scansiteid            bigint COMMENT '扫描网点ID',
    nextstationid         bigint COMMENT '上一站/下一站ID',
    scanuserid            bigint COMMENT '扫描雇员ID',
    send_deliver_userid   bigint COMMENT '收派员ID'
)
    COMMENT '网点揽收监控清洗表'
    PARTITIONED BY (dt string COMMENT 'input_time时间分区')
    ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
        WITH SERDEPROPERTIES (
        'serialization.format' = '1'
        )
    STORED AS
        INPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
        OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
    LOCATION '/dw/hive/jms_dwd.db/external/dwd_tab_sitetakingmonitor_base_dt'
;